# Created by 黄景涛
# DATE: 2025/4/29
from var_hot_loading.tools.yaml_util import *
from datetime import datetime


def format_time(fmt='%Y-%m-%d %H:%M:%S'):
    now = datetime.now()
    return now.strftime(fmt)


def read_yaml_key(key: str, type_=None):
    relative_file_path = 'config/config.yaml'
    if not type_:
        return read_key(relative_file_path, key)
    elif type_ == 'str':
        return str(read_key(relative_file_path, key))


def add(x, y, z=10):
    return int(x) + int(y) + int(z)


def sub(x, y):
    return int(x) - int(y)


def add1(x, y):
    return int(x) + int(y)


def concat(s1, s2):
    return s1 + s2


if __name__ == '__main__':
    read_yaml_key('username')
    read_yaml_key('auth.smart_saas.cookie')
    print(format_time())
